import pyaudio

def findInternalRecordingDevice(p):
    target = '立体声混音'
    for i in range(p.get_device_count()):
        devInfo = p.get_device_info_by_index(i)
        if target in devInfo['name'] and devInfo['maxInputChannels'] > 0:
            return i
    return -1
